<?php

/*

Creating Shop (makeshop.pro.php)

*/
ob_start();
include "global.inc.php";

$find_shop = fetch("SELECT id FROM usershops2 WHERE owner = '$userid' AND game = '$game'");
if ($find_shop[id])
{
	die(header(error("myshop.php?game=$game","You already have a shop, see:")));
}

if ($points < 250)
{
	die(header(error("makeshop.php?game=$game","You cannot afford the 250 $pointsVar to create a shop.")));
}

points($game,"$username", "-250");

$shop_name = smilies(badwords(strip_tags($shop_name,"<b><i>")));
$shop_desc = smilies(badwords(strip_tags($shop_desc,"<b><i><u><a><font><p><br><center><img>")));

mysql_query("INSERT INTO usershops2 (owner,shop_name,shop_desc,game) VALUES ('$userid','$shop_name','$shop_desc','$game')");

die(header(error("myshop.php?game=$game","Your shop has been created!")));

?>
